libxl: give reasons for ctx init failures
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 18 Jun 2010 13:07:42 +0000 (14:07 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 18 Jun 2010 13:07:42 +0000 (14:07 +0100)
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
tools/libxl/libxl.c

index a2cd91a8f7b52598f7896f60013585ec2023ad6c..ebcdb3d0406878dcc549fc80471ad39b3049c33d 100644 (file)
@@ -51,12 +51,16 @@ int libxl_ctx_init(struct libxl_ctx *ctx, int version, xentoollog_logger *lg)
 
     ctx->xch = xc_interface_open(lg,lg,0);
     if (!ctx->xch) {
+        XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, 
+                        "cannot open libxc handle");
         free(ctx->alloc_ptrs);
         return ERROR_FAIL;
     }
 
     ctx->xsh = xs_daemon_open();
     if (!ctx->xsh) {
+        XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, 
+                        "cannot connect to xenstore");
         xc_interface_close(ctx->xch);
         free(ctx->alloc_ptrs);
         return ERROR_FAIL;